#pragma once
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

std::string termal = "/dev/pts/2";
void OpenTerminal()
{
    int fd = open(termal.c_str(), O_WRONLY | O_TRUNC);
    if(fd < 0)
    {
        std::cerr << "open terminal error" << std::endl;
        return;
    }

    dup2(fd, 2);
}